type Day =
  | 'Monday'
  | 'Tuesday'
  | 'Wednesday'
  | 'Thursday'
  | 'Friday'
  | 'Saturday'
  | 'Sunday';

declare const day1: Day;

let result = '0';

switch (day1) {
  case 'Monday':
    result = '1';
    break;
  case 'Tuesday':
    result = '2';
    break;
  case 'Wednesday':
    result = '3';
    break;
  case 'Thursday':
    result = '4';
    break;
  case 'Friday':
    result = '5';
    break;
  case 'Saturday':
    result = '6';
    break;
  case 'Sunday':
    result = '7';
    break;
}

declare const day2: Day;

result = '0';

switch (day2) {
  case 'Monday':
    result = '1';
    break;
  default:
    result = '42';
}
console.info(result);

enum Fruit {
  apple = 'apple',
  banana = 'banana',
  cherry = 'cherry'
}

declare const fruit: Fruit;

switch (fruit) {
  case Fruit.apple:
    console.log('an apple');
    break;

  case Fruit.banana:
    console.log('a banana');
    break;

  case Fruit.cherry:
    console.log('a cherry');
    break;
}